import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'virtual:svg-icons-register'
import gloablComponent from './components/index'
import '@/styles/index.scss'
import router from './router'
import pinia from './store'
import "@/router/permission"
import { isHasButtons } from './directive/has'
import App from '@/App.vue'

//自定义指令文件(根据用户权限，判断按钮是否存在)
const app = createApp(App)
.use(ElementPlus)
.use(router)
.use(pinia)
.use(gloablComponent)

//自定义指令挂载到app
isHasButtons(app)
app.mount('#app')
